from PyQt4.QtGui import QApplication
from PyQt4.QtCore import *

from gui import NetinMonitorWidget
from ifconfig import ifconfigParser

def getNetinMonitor():
	wrapper = ifconfigParser()
	widget = NetinMonitorWidget(wrapper)
	return widget

def main():
	app = QApplication([])
	widget = getNetinMonitor()
	widget.show()
	app.connect(app, SIGNAL("lastWindowClosed()"),
		    app, SLOT("quit()"))
	app.exec_()

if __name__ == "__main__":
	main()
